<style type="text/css">
    .knowledge_shangchuanjindu_yulan{width: 100%;    height: 5px;    margin-top: 5px;    border-radius: 2px;    overflow: hidden;}
    .lookrecord{ cursor:pointer;}
    .lookrecord:hover{ color:#39f;}
</style>
<div class="traintask" ng-controller = "trainingTask">
    <!--筛选区-->
    <div class="traintask_top">
        <div></div>
        <div class="traintaskcztimefw" style="margin-left:-16px;">
            <a ng-click="updateCount()">任务时间范围</a><!--<span class="caret"></span>-->
            <input id="startDate" style="width:120px;" placeholder="开始日期" onclick="var endTime=$dp.$('startDate');wdatepicker({dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked:function(){endDate.click();},maxDate:'#F{$dp.$D(\'endDate\')}'})" ng-focus="GetDate()" >
            <span>-</span>
            <input style="width:120px;" id="endDate" placeholder="截止日期" value="" onclick="wdatepicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'startDate\')}'})"
                ng-focus="GetDate()"/>
        </div>
        <input type="file" id="excelFile" style=" display:none;" nv-file-select="" uploader="uploader" accept=".xls,.xlse">
        <div ng-if="false">
            培训人员<span class="caret"></span></div>
            <!--ng-mouseleave="trainTaskDrapDownIsShow = false"-->
        <div ng-click="trainTaskDrapDownIsShow = true" >
           {{selName}}<span class="caret"></span>
            <ul class="dropdown-menu"  ng-show="trainTaskDrapDownIsShow" ng-mouseleave="trainTaskDrapDownIsShow = false"> 
                <li class="traintask_top_pxjd_all" ng-click="trainSpeedSel(0)">
                    <svg class="icon" aria-hidden="true"><use xlink:href="#icon-biaoqianhuise"></use></svg>
                    全部</li>
                <li class="traintask_top_pxjd_wks" ng-click="trainSpeedSel(1)">
                    <svg class="icon" aria-hidden="true"><use xlink:href="#icon-circle"></use></svg>
                    未开始</li>
                <li class="traintask_top_pxjd_jxz" ng-click="trainSpeedSel(2)">
                    <svg class="icon" aria-hidden="true"><use xlink:href="#icon-circle"></use></svg>
                    进行中</li>
                <li class="traintask_top_pxjd_ywc" ng-click="trainSpeedSel(3)">
                    <svg class="icon" aria-hidden="true"><use xlink:href="#icon-circle"></use></svg>
                    已完成</li>
            </ul>
        </div>
        <div>
        <input type="text" placeholder="请输入任务名称" set-focus class="traintask_top_sousuo" ng-model="trainParams.name" ng-keyup = "findTrainListEnter($event)" style="height: 32px; border:0;"/>
        </div>
        <div ng-click="getTrainList()" style="height: 32px;">
            <svg class="icon" aria-hidden="true"><use xlink:href="#icon-sousuo"></use></svg>
            确认筛选
        </div>
        <div class="traintask_top_right">
            <!--绑定指令(预留) -->
            <div class="traintask_top_add " btncon="btnAdd" btn-obj="btnlist"><!--ng-click="addinfo()"-->
                <svg class="icon" aria-hidden="true"><use xlink:href="#icon-tianjia"></use></svg>
                新增/编辑任务</div>               
            <div class="traintask_top_select" btncon="btnDel" btn-obj="btnlist"><!--ng-click="delinfo()"-->
                <svg class="icon" aria-hidden="true"><use xlink:href="#icon-shanchu"></use></svg>
                删除</div>
        </div>
    </div>
    <!--内容区-->
    <div class="traintask_main">
        <div class="traintask_main_liebiao">
            <table class="tab" style="font-size: 13px;">
                <thead>
                    <th> <div class="traintask_main_liebiao_checkbox">
                            <div class="liebiaocheck-box" ng-click="selectAll()" ng-class="{selected:checkAll !=0 && checkAll == trainingTaskList.length}">
                                <!--添加selected为选中样式-->
                                <span class="iconfont"></span>
                            </div>
                            <div class="traintask_main_liebiaoli_xiugai" ng-if="false">
                                <svg class="icon" aria-hidden="true"><use xlink:href="#icon-xiugai"></use></svg>
                            </div>
                        </div></th>
                    <th style="width:8%;"></th>
                    <th align="left" style="width: 25%;">任务名称</th>                    
                    <th align="left" >任务创建时间</th>
                    <th align="left" >培训开始时间</th>
                    <th align="left" >培训结束时间</th>
                    <th style="text-align:left;">培训进度</th>
                    <th>课程数</th>
                    <th></th>
                    <!-- <th></th> -->
                </thead>
                <tbody>
                    <tr ng-if="trainingTaskList.length <=0 && !trainingTaskLoading">
                        <td colspan="12">
                            <center style="margin:100px auto;">
                                <img src="/images/null/null.png" />
                                <div style="font-size:30px;color:#a3a3a3;"  ng-bind="'Null' | T"></div>
                            </center>   
                        </td>
                    </tr>
                    <tr ng-if="trainingTaskLoading">
                        <td  colspan="12"><!--Loading-->
                            <loading isloading="trainingTaskLoading" ng-if="trainingTaskLoading"></loading>  
                        </td>
                    </tr>
                    <tr ng-repeat="trainObj in trainingTaskList"
                    ng-class = "{ 'traintask_main_liebiao_wancheng': (trainObj.user_complete/trainObj.user_count)*100 >=100, 'traintask_main_liebiao_weikaishi': (trainObj.user_complete/trainObj.user_count)*100 <=0 || !trainObj.user_complete,'traintask_main_liebiao_jinxingzhong': (trainObj.user_complete/trainObj.user_count)*100 >0 && (trainObj.user_complete/trainObj.user_count)*100 <100}">
                        <td class="tdshou"><div class="traintask_main_liebiao_checkbox">
                            <div class="liebiaocheck-box" ng-click="singleCheck(trainObj)" ng-class="{selected:trainObj.isSel}">
                                <!--添加selected为选中样式-->
                                <span class="iconfont"></span>
                            </div>
                            <div class="traintask_main_liebiaoli_xiugai" ng-click="addinfo(trainObj)">
                                <svg class="icon" aria-hidden="true"><use xlink:href="#icon-bianji"></use></svg>
                            </div>
                        </div></td>
                        <td class="tdshou">
                            <img ng-src="{{trainObj.img}}"  src="/images/train/fengmian098.png" style="height: 45px;width:70px;" onerror="javascript:this.src='/images/train/fengmian098.png'">
                        </td>
                        <td class="tdshou">
                            <div class="traintask_main_liebiao_pxkstime_sj" ng-bind="trainObj.name"></div>
                            <div class="traintask_main_liebiao_pxkstime_data">[{{trainObj.isStudy?'必修':'选修'}}] 积分：{{trainObj.integral}}</div>
                        </td>
                        <td class="tdshou">
                            <div class="traintask_main_liebiao_pxkstime_sj" ng-bind="trainObj.create_Date | to_time">
                                00:00</div>
                            <div class="traintask_main_liebiao_pxkstime_data" ng-bind="trainObj.create_Date | to_date">
                                0000-00-00</div>
                            
                        </td>
                        <td  class="tdshou">
                            <div class="traintask_main_liebiao_pxkstime_sj" ng-bind="trainObj.start_Date | to_time"  ng-if="trainObj.date_formate==1">
                                00:00</div>
                            <div class="traintask_main_liebiao_pxkstime_data" ng-bind="trainObj.start_Date | to_date"  ng-if="trainObj.date_formate==1">
                                0000-00-00</div>
                            <div class="traintask_main_liebiao_pxkstime_data" ng-if="trainObj.date_formate==0 || trainObj.date_formate==2">
                                ----</div>
                        </td>
                        <td  class="tdshou"> <div class="traintask_main_liebiao_pxjstime_sj" ng-bind="trainObj.end_Date | to_time" ng-if="trainObj.date_formate==1">
                                00:00</div>
                            <div class="traintask_main_liebiao_pxjstime_data" ng-bind="trainObj.end_Date | to_date" ng-if="trainObj.date_formate==1">
                                0000-00-00</div>
                                <div class="traintask_main_liebiao_pxkstime_data" ng-if="trainObj.date_formate==0 || trainObj.date_formate==2">
                                ----</div></td>
                        <td class="tdshou ">
                            <div ng-bind=" (trainObj.user_complete>0? trainObj.user_complete :'0')+'/'+ (trainObj.user_count?trainObj.user_count:0) +'人'">
                                0/0人</div>
                            <div class="progress knowledge_shangchuanjindu_yulan">
                                <div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0"
                                    aria-valuemax="100" style="width: {{(trainObj.user_complete/trainObj.user_count)*100}}%;">
                                </div>
                            </div>
                        </td>
                        <td class="tdshou"  align="center" ng-bind="trainObj.courser_count">0000</td>
                        <td class="tdshou" align="center">
                            <div ng-click="statisticOpen(trainObj)" class="lookrecord">
                                <svg class="icon" aria-hidden="true"><use xlink:href="#icon-jilu"></use></svg>
                                查看记录</div>
                            <div style="display: none;">
                                <svg class="icon" aria-hidden="true"><use xlink:href="#icon-yanjing"></use></svg>
                                任务预览</div>
                        </td>
                        <!-- <td class="tdshou" style="position: relative; text-align: center;">                      
                            <div ng-mousemove="trainObj.isToolShow=true" ng-mouseleave ="trainObj.isToolShow = false" >
                                <svg class="icon" aria-hidden="true"><use xlink:href="#icon-ttpodicon1"></use></svg>
                                <ul class="dropdown-menu" ng-if="trainObj.isToolShow" style="position: absolute;top: 10px;z-index: 999;">
                                    <li ng-click="openLog(trainObj)">
                                        <svg class="icon" aria-hidden="true"><use xlink:href="#icon-yidongwenjian"></use></svg>
                                        导入用户</li>
                                    <li no-click="Edit" mnt="addinfo(trainObj)">
                                        <svg class="icon" aria-hidden="true"><use xlink:href="#icon-bianji"></use></svg>
                                        编辑任务</li>
                                    <li ng-click="openTaksComShow(trainObj)" ng-if="showUpdateTime">
                                        <svg class="icon" aria-hidden="true"><use xlink:href="#icon-yidongwenjian"></use></svg>
                                        添加学时</li>
                                    <li no-click="Delete" mnt="delinfo(trainObj)">
                                        <svg class="icon" aria-hidden="true"><use xlink:href="#icon-shanchu"></use></svg>
                                        删除任务</li>
                                </ul>
                            </div>
                        </td> -->
                    </tr>
                </tbody>
            </table>

        </div>
        <!--分页-->
        <tm-pagination conf="paginationConf"></tm-pagination>
        <training-task-complete ng-if="taksComShow" task-obj="taskItem" on-close="openTaksComShow()"></training-task-complete> 
        <training-task-add-edit ng-if="taksAddEditShow" task-obj="taskItem" uploader="uploader" is-save-btn="btnloading" on-save="onSaveTask()" on-close="onCloseTask()"></training-task-add-edit>               
    </div>         
    <training-task-preview ng-if="previewShow" task-obj="previewObj" on-close="closePreview()"  show-know="true" ></training-task-preview>
     <!---------------------------------------------------------------------------------------------------------------------------------------------------------------------->
    <v-modal class="vModal--default" onclose="addUserFactory.closeuser()" ng-show="showLog">
    <!-- 请计算personne的高度，用页面高度-90=此框架高度 -->
    <div class="personneladd personnelout" ng-show="showLog" 
        ng-style="personneladdstyle" style=" height:80%; width:600px">
        <div class="personneladdheader" style="margin-bottom: 10px;">
            <div class="personneladdheaderl">
                导入/日志</div>
            <div class="personneladdheaderzwf" style="text-align:right;" >
                <a href="javascript:void(0)"  ng-click="importExcel()" style="color: #39f;text-decoration: none;">
                <svg class="icon" aria-hidden="true"><use xlink:href="#icon-boxremove"></use></svg>
                导入</a>
                <a href="/sysresource/trainuser.xls" download="培训任务导入人员模板" style="color: #39f;text-decoration: none;">
                <svg class="icon" aria-hidden="true"><use xlink:href="#icon-xiazai2"></use></svg>
                下载模板</a>
            </div>
            <div class="personneladdheaderr">
                <div class="close" ng-click="openLog()">
                    <span>+</span></div>
          
             </div>
        </div>
        
        <div class="personneladdbottom">
            <!-- +150+160+190+135+70 -->
            <div class="personneladdrydrrwlb">
                <div class="personneladdrydrrwlbmain">
                    <ul>
                        <li class="personneladdrydrrwlli">
                            <div class="personneladdrydrrwlbname">
                                导入名称</div>
                            <div class="personneladdrydrrwlbdrtime">
                                导入时间</div>
                            <div class="personneladdrydrrwlbdrczr">
                                操作人</div>
                            <div class="personneladdrydrrwlbdcrz">
                                导入日志</div>
                        </li>
                        <li class="personneladdrydrrwlli" ng-repeat="exitem in exUserList">
                            <div class="personneladdrydrrwlbname" ng-bind="exitem.log_Name">
                            </div>
                            <div class="personneladdrydrrwlbdrtime">
                                <div class="personneladdrydrrwlbdrtime_time" ng-bind="exitem.import_Time | to_time">
                                    09:30</div>
                                <div class="personneladdrydrrwlbdrtime_date" ng-bind="exitem.import_Time | to_date">
                                    2017-1-22</div>
                            </div>
                            <div class="personneladdrydrrwlbdrczr" ng-bind="exitem.user_Name">
                                管理</div>
                            <div class="personneladdrydrrwlbdcrz" style="width: 15%;">
                                <i class="iconfont">&#xe612;</i><a ng-href="{{exitem.log_Path}}" ng-if="exitem.log_Path"
                                    target="_blank">下载日志</a></div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    </v-modal>
    <!---------------------------------------------------------------------------------------------------------------------------------------------------------------------->
</div>
